export default {
    phonePatterns: {
      mainland: /^(?:\+?86)?1[3-9]\d{9}$/,
      hongKong: /^(?:\+?852)?[56789]\d{7}$/,
      macau: /^(?:\+?853)?6\d{7}$/,
      taiwan: /^(?:\+?886)?9\d{8}$/
    },
  
    getPhoneRegion(phoneNumber) {
      if (this.phonePatterns.mainland.test(phoneNumber)) {
        return 'Mainland';
      } else if (this.phonePatterns.hongKong.test(phoneNumber)) {
        return 'Hong Kong';
      } else if (this.phonePatterns.macau.test(phoneNumber)) {
        return 'Macau';
      } else if (this.phonePatterns.taiwan.test(phoneNumber)) {
        return 'Taiwan';
      } else {
        return 'Unknown';
      }
    }
  };
  